import 'package:flutter_test/flutter_test.dart';
import 'package:connectivitytest/connectivitytest.dart';
import 'package:connectivitytest/connectivitytest_platform_interface.dart';
import 'package:connectivitytest/connectivitytest_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockConnectivitytestPlatform
    with MockPlatformInterfaceMixin
    implements ConnectivitytestPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ConnectivitytestPlatform initialPlatform = ConnectivitytestPlatform.instance;

  test('$MethodChannelConnectivitytest is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelConnectivitytest>());
  });

  test('getPlatformVersion', () async {
    Connectivitytest connectivitytestPlugin = Connectivitytest();
    MockConnectivitytestPlatform fakePlatform = MockConnectivitytestPlatform();
    ConnectivitytestPlatform.instance = fakePlatform;

    expect(await connectivitytestPlugin.getPlatformVersion(), '42');
  });
}
